package com.yiqiu.auth.controller;

import com.yiqiu.auth.service.AuthService;
import com.yiqiu.common.core.domain.LoginUser;
import com.yiqiu.common.core.domain.vo.AjaxResult;
import com.yiqiu.system.api.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author weiyi
 */
@RestController
public class AuthController {

    @Autowired
    private UserFeignClient userFeignClient;
    @Autowired
    private AuthService authService;

    @GetMapping("/list")
    public AjaxResult list() {
       return userFeignClient.list();
    }
    @PostMapping("/login")
    public AjaxResult login(String username, String password) {
        LoginUser loginUser = authService.login(username, password);
        return null;
    }
    @PostMapping("/register")
    public String register(String username, String password) {
        return null;
    }
    @PostMapping("/logout")
    public String logout() {
        return null;
    }



}
